package middler

// 跨域配置
const (
	allowOrigin      = "*"
	allowMethod      = "POST, GET, OPTIONS, PUT, DELETE,UPDATE"
	allowHeader      = "Authorization, Content-Length, X-CSRF-Token, Token,session,X_Requested_With,Accept, Origin, Host, Connection, Accept-Encoding, Accept-Language,DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type,debug"
	exposeHeaders    = "Content-Length, Access-Control-Allow-Origin, Access-Control-Allow-Headers,Cache-Control,Content-Language,Content-Type,Cache,Expires,Last-Modified,Pragma,FooBar"
	maxAge           = "172800"
	AllowCredentials = "false"
)

const (
	CODE   = "code"   // 响应状态描述标识
	MSG    = "msg"    // 错误日志标识
	RESULT = "result" // 正确返回内容标识

	ErrOK    = 0 // 无误
	Err      = 1 // 未知err
	ErrMgo   = 2 // 数据库处理报错
	ErrReq   = 3 // 请求内容报错
	ErrRes   = 4 // 返回内容报错
	ErrRedis = 5 // redis运行错误

	CLAIMS  = "claims"  // 鉴权信息标识
	CONTEXT = "context" // 上下文信息，通常需要伴随请求的全部过程

	GAME     = "game"     // game标识
	TEAMID   = "teamID"   // team标识
	USERID   = "userID"   // 用户标识
	ROOMID   = "roomID"   // 房间标识
	TEAMNAME = "teamName" // teamName

	PAGE     = "page"     // 分页
	PAGESIZE = "pageSize" // 分页大小

	Secret = "secret" // secret标识

	Common   = "common"   // 通用标识
	dreamjoy = "dreamjoy" // debug标识
	apibe    = "apibe"
)
